package model.dao;

import org.springframework.jdbc.core.JdbcTemplate;

public class DelDaoImpl implements DelDao{
    private JdbcTemplate template;

    public DelDaoImpl(JdbcTemplate template) {
        this.template = template;
    }
    public DelDaoImpl() {
        this.template = new JdbcTemplate(BaseDao.getDataSource());
    }

    @Override
    public void del(String bookNo) {
        String sql="delete from books where bookNo=?";
        int count=template.update(sql,bookNo);
        //System.out.println(count);
    }
}
